# ===============================================================
# Filename: Makefile
# -------------------------------
# Copyright(C),
# Author: zhenquan.qiu
# Version: V1.0.0
# Last modified: 21/12 2016 11:49
# Description:
#
# Change Log:
# NO.	Author		    Date		Modified
# 00	zhenquan.qiu	21/12 2016
# ===============================================================

ifeq ($(KERNELRELEASE),)
	KDIR := /lib/modules/`uname -r`/build
	PWD  ?= $(shell pwd)

modules:
	$(MAKE) -C $(KDIR) M=$(PWD) modules

modules_install:
	$(MAKE) -C $(KDIR) M=$(PWD) modules_install

clean:
	rm -rf *.o *.ko *.mod.c *.order *.symvers .*.cmd .tmp_versions $(PROGRAM)

.PHONY:
	modules modules_install clean

else
	obj-m := hello-world.o

endif

